import request from '@/utils/request';

export function listCourse(query) {
  return request({
    url: '/college/course/list',
    method: 'get',
    params: query
  });
}

export function addCourse(data) {
  return request({
    url: '/college/course/add',
    method: 'post',
    data: data
  })
}

export function editCourse(data) {
  return request({
    url: '/college/course/edit',
    method: 'put',
    data: data
  })
}

export function removeCourse(id) {
  return request({
    url: '/college/course/remove/'+id,
    method: 'delete'
  })
}

export function courseType() {
  return request({
    url: '/college/course/type',
    method: 'get'
  });
}

export function courseLabel(id) {
  return request({
    url: '/college/course/label/'+id,
    method: 'get'
  });
}

export function lineCourse(data) {
  return request({
    url: '/college/course/line',
    method: 'put',
    data: data
  })
}
